package CreationalPatterns.Single;
/*
懒汉式，线程不安全
 */
public class SingleObject2 {

  private static SingleObject2 instance = new SingleObject2();

  private SingleObject2(){};

  public static SingleObject2 getInstance() {
    if (instance == null){
      instance = new SingleObject2();
    }
    return instance;
  }

  public void show(){
    System.out.println("懒汉式，线程不安全");
  }
}
